//
//  QuestionSearchViewController.m
//  Utils
//
//  Created by enghou on 2018/6/7.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

#import "QuestionSearchViewController.h"

@interface QuestionSearchViewController ()

@end

@implementation QuestionSearchViewController

-(instancetype)init{
    UIStoryboard *story = [UIStoryboard storyboardWithName:@"ImportantArea" bundle:[NSBundle mainBundle]];
    return [story instantiateViewControllerWithIdentifier:@"QuestionSearchViewController"];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"提交" style:UIBarButtonItemStylePlain target:self action:@selector(search)];
    self.navigationItem.rightBarButtonItem.tintColor = [UIColor whiteColor];
}

-(void)search{
    if ([self.theDelegate respondsToSelector:@selector(fetchModel:)]) {
        [self.theDelegate fetchModel:[self searchParameter]];
        [self pop];
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
